package com.xhwl.logistics.bo;

import com.xhwl.logistics.constant.VehicleConstant;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;
import java.util.Date;

@Setter
@Getter
public class VehiclePayRecordBO {

    private final static BigDecimal bigDecimal = new BigDecimal(100);

    private String plateNumber;

    private String homeAddress;

    private Integer cardType;

    private Date payTime;

    private VehiclePayRecordStayTimeBO vehiclePayRecordStayTimeBO;

    private Integer totalMoney;

    private Integer paidMoney;

    private Integer freeMoney;

    public String totalMoneyString() {
        return new BigDecimal(totalMoney).divide(bigDecimal, VehicleConstant.VEHICLE_PAY_RECORD_SCALE, VehicleConstant.VEHICLE_PAY_RECORD_ROUNDING_MODE).toString();
    }

    public String paidMoneyString() {
        return new BigDecimal(paidMoney).divide(bigDecimal, VehicleConstant.VEHICLE_PAY_RECORD_SCALE, VehicleConstant.VEHICLE_PAY_RECORD_ROUNDING_MODE).toString();
    }

    public String freeMoneyString() {
        return new BigDecimal(freeMoney).divide(bigDecimal, VehicleConstant.VEHICLE_PAY_RECORD_SCALE, VehicleConstant.VEHICLE_PAY_RECORD_ROUNDING_MODE).toString();
    }

}
